home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / MATHS / ARCAUT / Automatons / Chaos < prev    next >
Text File  |  1991-07-26  |  895b  |  35 lines

  1. AUTOMATON*
  2.  
  3.   Chaos
  4.  
  5.   This uses the Moore neighbourhood & the maximum of 256 cell states. The
  6.   states are partitioned into two sections. On one, evolution occurs by
  7.   averaging & incrementing the cells (as in Rug) & on the other in a
  8.   'approximately' chaotic manner; there is a slight overlap between the two
  9.   resulting bands of states. This leads to competing regions of 'Rug' type
  10.   stability & of 'Chaos'. Try 150x100 & 50x40 windows.
  11.  
  12. INITIALISATION*
  13.  
  14.   10DEF PROCdo
  15.   20*SetEval wrap on
  16.   30*SetEval l 96
  17.   40*SetEval k 115
  18.   50*SetEval inc 13
  19.   60ENDPROC
  20.  
  21. SCREEN*
  22.  
  23.   10DEF PROCdo
  24.   20PROCsoup(0,256,1)
  25.   30ENDPROC
  26.  
  27. CODE*
  28.  
  29. ( CELL [<l>/2] < IF ([FNround(2*<k>/<l>*256)] CELL * 8 >> ==)
  30.   CELL  <l>   <= IF ([FNround(2*<k>/<l>*256)] CELL * 8 >>
  31.                      [FNround(2*<k>)] SWAP -              ==)
  32.   READ_NEIG
  33.   SUM_NEIG 3 >> <inc> +                                   ==  )
  34.  
  35. END*